package com.admin.service;

import com.admin.service.vo.SysUserGroup;
import com.admin.common.biz.BizBaseResult;

import java.util.List;

public interface SysUserGroupService {

    /**
     * 创建用户组
     * @param sysUserGroup
     * @return
     */
    SysUserGroup createSysUserGroup(SysUserGroup sysUserGroup);

    /**
     * 保存
     * @param sysUserGroup
     * @return
     */
    int saveSysUserGroup(SysUserGroup sysUserGroup);

    /**
     * 修改
     * @param sysUserGroup
     * @return
     */
    int editionSysUserGroup(SysUserGroup sysUserGroup);

    /**
     * 移除
     * @param sysUserGroup
     * @return
     */
    int removeSysUserGroup(SysUserGroup sysUserGroup);

    /**
     *
     * @param id
     * @return
     */
    SysUserGroup queryById(String id);

    /**
     *
     * @return
     */
    List<SysUserGroup> queryAll();

    /**
     *
     * @param fartherGroupId
     * @param isEnd
     * @return
     */
    SysUserGroup queryChildrenByFatherGroup(String fartherGroupId, boolean isEnd);

    /**
     * 父级
     * @param childrenId
     * @return
     */
    SysUserGroup queryFartherByChildren(String childrenId);

    /**
     *
     * @param personId
     * @param personIds
     * @param name
     * @param emial
     * @param idCard
     * @param phone
     * @param use
     * @return
     */
    List<SysUserGroup> queryByPersonInfo(String personId, List<String> personIds, String name, String emial, String idCard,
                                         String phone, boolean use);

    /**
     *
     * @param userId
     * @return
     */
    List<SysUserGroup> queryByUser(String userId);

    /**
     *
     * @param userIds
     * @param userGroupIds
     * @return 成功userGroupIds
     */
    List<String> bindUser(List<String> userIds, List<String> userGroupIds);

    /**
     *
     * @param userIds
     * @return 成功userIds
     */
    List<String> unbindUser(List<String> userIds);


    /**
     *
     * @param sysUserGroup
     * @return
     */
    BizBaseResult canRemove(SysUserGroup sysUserGroup);

    /**
     *
     * @param name
     * @return
     */
    boolean canUseUserGroupName(String name);
}
